import http from '@/util/httpRequest.js'
export function page(search){
    return http({
        method:'post',
        url:`/sys/user/page?=${search.perPageCount}&current=${search.currentPage}`,

        data:search.condition
    })
}

export function save(data){
   return http({
       method:'post',
       url:`/sys/user/save`,
       data
   })
}
export function update(data){
    return http({
        method:'put',
        url:`/sys/user/update`,
        data
    })
 }

 export function setUserWithMenu(data){
    return http({
        method:'post',
        url:`/sys/user/setUserWithMenu`,
        data
    })
 }

 export function getMenuByUserId(id){
   return http({
       method:'get',
       url:`/sys/user/getMenu/${id}`
   })
 }

 export function setUserWithRole(data){
    return http({
        method:'post',
        url:`/sys/user/setUserWithRole`,
        data
    })
 }

 export function getUserWithRole(id){
   return http({
       method:'get',
       url:`/sys/user/getUserWithRole/${id}`
   })
 }
 
 export function getAllRole(){
    return http({
        method:'get',
        url:`/sys/role/_all`
    })
  }